package cn.bluemobi.app.controller.systemSetting;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.bluemobi.app.core.controller.AppBaseController;
import cn.bluemobi.app.entity.output.ControlAudit;
import cn.bluemobi.app.entity.output.SystemSetting;
import cn.bluemobi.app.service.SystemSettingService;
import cn.bluemobi.common.core.dto.Dto;

import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiParam;

/**
 * 
 * @author lvxh
 * 
 */
@Controller
@RequestMapping("/systemSetting")
@Api(description = "系统设置", value = "systemSetting")
public class SystemSettingController extends AppBaseController {

	@Autowired
	private SystemSettingService systemSettingService;

	@ApiOperation(value = "查询系统设置", httpMethod = "POST")
	@RequestMapping("/findSystemSetting")
	@ResponseBody
	public Dto<SystemSetting> findSystemSetting() {
		return systemSettingService.findSystemSetting();
	}

	@ApiOperation(value = "控制APP审核", httpMethod = "POST")
	@RequestMapping("/findControlAuditByVersion")
	@ResponseBody
	public Dto<ControlAudit> findControlAuditByVersion(
			@ApiParam("版本") @RequestParam("version") String version,
			@ApiParam("类型") @RequestParam("type") String type) {
		return systemSettingService.findControlAuditByVersion(version, type);
	}
}
